package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EvSuggestionMapper;
import com.ruoyi.system.domain.EvSuggestion;
import com.ruoyi.system.service.IEvSuggestionService;

/**
 * 建议收集Service业务层处理
 * 
 * @author WJM
 * @date 2025-11-19
 */
@Service
public class EvSuggestionServiceImpl implements IEvSuggestionService 
{
    @Autowired
    private EvSuggestionMapper evSuggestionMapper;

    /**
     * 查询建议收集
     * 
     * @param suggestionId 建议收集主键
     * @return 建议收集
     */
    @Override
    public EvSuggestion selectEvSuggestionBySuggestionId(Long suggestionId)
    {
        return evSuggestionMapper.selectEvSuggestionBySuggestionId(suggestionId);
    }

    /**
     * 查询建议收集列表
     * 
     * @param evSuggestion 建议收集
     * @return 建议收集
     */
    @Override
    public List<EvSuggestion> selectEvSuggestionList(EvSuggestion evSuggestion)
    {
        return evSuggestionMapper.selectEvSuggestionList(evSuggestion);
    }

    /**
     * 新增建议收集
     * 
     * @param evSuggestion 建议收集
     * @return 结果
     */
    @Override
    public int insertEvSuggestion(EvSuggestion evSuggestion)
    {
        evSuggestion.setCreateTime(DateUtils.getNowDate());
        return evSuggestionMapper.insertEvSuggestion(evSuggestion);
    }

    /**
     * 修改建议收集
     * 
     * @param evSuggestion 建议收集
     * @return 结果
     */
    @Override
    public int updateEvSuggestion(EvSuggestion evSuggestion)
    {
        return evSuggestionMapper.updateEvSuggestion(evSuggestion);
    }

    /**
     * 批量删除建议收集
     * 
     * @param suggestionIds 需要删除的建议收集主键
     * @return 结果
     */
    @Override
    public int deleteEvSuggestionBySuggestionIds(Long[] suggestionIds)
    {
        return evSuggestionMapper.deleteEvSuggestionBySuggestionIds(suggestionIds);
    }

    /**
     * 删除建议收集信息
     * 
     * @param suggestionId 建议收集主键
     * @return 结果
     */
    @Override
    public int deleteEvSuggestionBySuggestionId(Long suggestionId)
    {
        return evSuggestionMapper.deleteEvSuggestionBySuggestionId(suggestionId);
    }
}
